﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.InterferenceVolume.CApIVInterferenceVolumeCreationParams
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.InterferenceVolume;

internal class CApIVInterferenceVolumeCreationParams
{
  private string m_name;
  private TxColor m_color;
  private TxObjectList m_sweptVolumes;
  private TxInterferenceVolume m_existingInterferenceVolume;
  private CApIVInterferenceVolumeCreationParams.eActions m_actions;

  internal CApIVInterferenceVolumeCreationParams(string name) => this.m_name = name;

  internal CApIVInterferenceVolumeCreationParams(string name, TxColor color)
  {
    this.m_name = name;
    this.m_color = color;
  }

  internal CApIVInterferenceVolumeCreationParams(
    string name,
    TxColor color,
    TxObjectList sweptVolumes)
  {
    this.m_name = name;
    this.m_color = color;
    this.m_sweptVolumes = sweptVolumes;
  }

  internal CApIVInterferenceVolumeCreationParams(
    string name,
    TxColor color,
    TxObjectList sweptVolumes,
    TxInterferenceVolume existingInterferenceVolume)
  {
    this.m_name = name;
    this.m_color = color;
    this.m_sweptVolumes = sweptVolumes;
    this.m_existingInterferenceVolume = existingInterferenceVolume;
  }

  internal string Name
  {
    get => this.m_name;
    set => this.m_name = value;
  }

  internal TxColor Color
  {
    get => this.m_color;
    set => this.m_color = value;
  }

  internal TxObjectList SweptVolumes
  {
    get => this.m_sweptVolumes;
    set => this.m_sweptVolumes = value;
  }

  internal TxInterferenceVolume ExistingInterferenceVolume
  {
    get => this.m_existingInterferenceVolume;
    set => this.m_existingInterferenceVolume = value;
  }

  internal bool RequireAction(
    CApIVInterferenceVolumeCreationParams.eActions action)
  {
    return (this.m_actions & action) == action;
  }

  internal void InsertAction(
    CApIVInterferenceVolumeCreationParams.eActions action)
  {
    this.m_actions |= action;
  }

  internal void RemoveAction(
    CApIVInterferenceVolumeCreationParams.eActions action)
  {
    this.m_actions &= ~action;
  }

  internal void ClearActions()
  {
    this.m_actions = CApIVInterferenceVolumeCreationParams.eActions.None;
  }

  [Flags]
  internal enum eActions
  {
    None = 0,
    DisplayBlankedSweptVolumes = 1,
    SkipVolumeCalculation = 2,
    DeleteEmptyInterferenceVolume = 4,
  }
}
